package com.cloudkinto.service.address;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.bo.address.AddressBookAddBo;
import com.cloudkinto.bo.address.AddressBookQueryBo;
import com.cloudkinto.bo.address.AddressBookUpdateBo;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.AddressBookDo;
import com.cloudkinto.vo.common.CommonBatchOperationVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 地址簿 service接口
 * </p>
 *
 * @author long
 * @since 2025-01-06
 */
public interface AddressBookService extends IService<AddressBookDo> {

    int add(AddressBookAddBo req);

    int update(AddressBookUpdateBo req);

    int delete(Long id);

    AddressBookDo detail(Long id);

    SingleResult pageInit(Long tenantId, Long companyId);

    PageResult getListPage(AddressBookQueryBo bo);

    SingleResult listPageStatusSta(AddressBookQueryBo bo);

    void getAddressBookImportTemplate(HttpServletResponse response) throws IOException;

    CommonBatchOperationVo importAdd(MultipartFile file);

    Long checkExist(AddressBookAddBo bo, Long tenantId, Long companyId);
}
